package com.wanxi.dao;

import com.wanxi.model.ProductModel;

import java.util.ArrayList;
import java.util.List;

public class ProductDao {
    public List<ProductModel> getProductModelList() {
        String[] imgHrefs = {"../img/11_bo39.jpg", "../img/11_bo39.jpg"};
        String[] names = {"家常豆腐", "家常豆腐"};
        String[] contents = {"豆腐半斤，蔬菜若干", "豆腐半斤，蔬菜若干"};
        List<ProductModel> list = new ArrayList<>();
        for (int i = 0; i < imgHrefs.length; i++) {
            list.add(ProductModel.builder()
                    .imgHref(imgHrefs[i])
                    .name(names[i])
                    .content(contents[i])
                    .build());
        }
        return list;
    }

    public List<ProductModel> getProductModelListForCompanyPage() {
        String[] imgHrefs = {"../img/11_bo39.jpg", "../img/11_bo39.jpg", "../img/11_bo39.jpg", "../img/11_bo39.jpg", "../img/11_bo39.jpg", "../img/11_bo39.jpg", "../img/11_bo39.jpg", "../img/11_bo39.jpg"};
//        String[] names = {"家常豆腐", "家常豆腐"};
//        String[] contents = {"豆腐半斤，蔬菜若干", "豆腐半斤，蔬菜若干"};
        List<ProductModel> list = new ArrayList<>();
        for (int i = 0; i < imgHrefs.length; i++) {
            list.add(ProductModel.builder()
                    .imgHref(imgHrefs[i])
//                    .name(names[i])
//                    .content(contents[i])
                    .build());
        }
        return list;

    }
}
